diff --git a/drivers/clk/aspeed/clk_ast2500.c b/drivers/clk/aspeed/clk_ast2500.c
index ccfeded..284f5f5 100644
--- a/drivers/clk/aspeed/clk_ast2500.c
+++ b/drivers/clk/aspeed/clk_ast2500.c
@@ -498,8 +498,8 @@
 	struct ast2500_clk_priv *priv = dev_get_priv(dev);
 
 	priv->scu = devfdt_get_addr_ptr(dev);
-	if (IS_ERR(priv->scu))
-		return PTR_ERR(priv->scu);
+	if (!priv->scu)
+		return -EINVAL;
 
 	return 0;
 }
diff --git a/drivers/core/fdtaddr.c b/drivers/core/fdtaddr.c
index dfcb868..8b48aa5 100644
--- a/drivers/core/fdtaddr.c
+++ b/drivers/core/fdtaddr.c
@@ -154,7 +154,9 @@
 
 void *devfdt_get_addr_ptr(const struct udevice *dev)
 {
-	return (void *)(uintptr_t)devfdt_get_addr_index(dev, 0);
+	fdt_addr_t addr = devfdt_get_addr_index(dev, 0);
+
+	return (addr == FDT_ADDR_T_NONE) ? NULL : (void *)(uintptr_t)addr;
 }
 
 void *devfdt_remap_addr_index(const struct udevice *dev, int index)
diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c
index 214362d..253e653 100644
--- a/drivers/i2c/ast_i2c.c
+++ b/drivers/i2c/ast_i2c.c
@@ -93,8 +93,8 @@
 	int ret;
 
 	priv->regs = devfdt_get_addr_ptr(dev);
-	if (IS_ERR(priv->regs))
-		return PTR_ERR(priv->regs);
+	if (!priv->regs)
+		return -EINVAL;
 
 	ret = clk_get_by_index(dev, 0, &priv->clk);
 	if (ret < 0) {
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
index 2206e95..ac0377e 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -194,7 +194,7 @@
 	}
 
 	priv->base_reg = devfdt_get_addr_ptr(dev);
-	if (priv->base_reg == (void *)FDT_ADDR_T_NONE) {
+	if (!priv->base_reg) {
 		debug("%s: Failed to get base address\n", __func__);
 		return -EINVAL;
 	}
diff --git a/drivers/timer/ast_timer.c b/drivers/timer/ast_timer.c
index 3838601..9f28cbf 100644
--- a/drivers/timer/ast_timer.c
+++ b/drivers/timer/ast_timer.c
@@ -65,8 +65,8 @@
 	struct ast_timer_priv *priv = dev_get_priv(dev);
 
 	priv->regs = devfdt_get_addr_ptr(dev);
-	if (IS_ERR(priv->regs))
-		return PTR_ERR(priv->regs);
+	if (!priv->regs)
+		return -EINVAL;
 
 	priv->tmc = ast_get_timer_counter(priv->regs, AST_TICK_TIMER);
 
diff --git a/drivers/watchdog/ast_wdt.c b/drivers/watchdog/ast_wdt.c
index 7e11465..a21f9a4 100644
--- a/drivers/watchdog/ast_wdt.c
+++ b/drivers/watchdog/ast_wdt.c
@@ -91,8 +91,8 @@
 	struct ast_wdt_priv *priv = dev_get_priv(dev);
 
 	priv->regs = devfdt_get_addr_ptr(dev);
-	if (IS_ERR(priv->regs))
-		return PTR_ERR(priv->regs);
+	if (!priv->regs)
+		return -EINVAL;
 
 	return 0;
 }
diff --git a/include/dm/read.h b/include/dm/read.h
index cac7dd5..0a7aacd 100644
--- a/include/dm/read.h
+++ b/include/dm/read.h
@@ -802,9 +802,7 @@
 
 static inline void *dev_read_addr_ptr(const struct udevice *dev)
 {
-	void *addr = devfdt_get_addr_ptr(dev);
-
-	return ((fdt_addr_t)(uintptr_t)addr == FDT_ADDR_T_NONE) ? NULL : addr;
+	return devfdt_get_addr_ptr(dev);
 }
 
 static inline fdt_addr_t dev_read_addr_pci(const struct udevice *dev)
